#include <bits/stdc++.h>
using namespace std;
int n,mon[100005];
bool cmp(int i,int j) {return i > j;}
int main() {
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> mon[i];
    sort(mon+1,mon+1+n,cmp);
    int ans = 0;
    for (int i = 1; i < n;i++) {
        if (mon[i] > mon[i+1]) i++;
        ans++;
    }
    cout << ans;
    return 0;
}
